Many vehicle systems of recent years are comprised of an ECU that operates computerized vehicle control equipment, that is, an electronic control unit, and an onboard LAN (local area network) that enables communication between plural ECUs.
In vehicle systems, as the amount of computation increases, ECUs equipped with a multi-core microcontroller (multi-core microcomputer) equipped with plural arithmetic units (CPUs) begin to be employed. In a multi-core microcomputer, a data conflict can occur when plural CPUs access shared data (write data or read data) in a shared memory such as dual-port RAM.
Exclusive control is known as a method for avoiding data conflicts. Exclusive control is a technique for realizing the absence of simultaneous occurrence of timings of accessing shared data, and a semaphore or the like is used. A semaphore is acquired before accessing shared data, and if the acquisition is successful, update (writing) of or reference to (reading) data is carried out. After the update of or reference to the data is finished, the semaphore is released. The release of the semaphore can only be done by the CPU or task that acquires the semaphore. If another CPU tries to acquire a semaphore when one CPU is acquiring the semaphore, a waiting state sets in until the semaphore is released. As the semaphore is released, one CPU of the CPUs waiting for the release of the semaphore can acquire the semaphore. The semaphore among multiple cores is realized by such hardware that plural CPUs cannot acquire the semaphore simultaneously.
Also, in the development of vehicle systems, every time a new vehicle model is developed, addition of a new function or change in the performance of the multi-core microcomputer installed on the ECU can take place, and the allocation of CPUs that execute software needs to be changed. Since work to change software is needed when changing the allocation of CPUs, the number of processes to reuse the development resources of software increases.
In the following PTL 1, data in a shared memory which is updated and referred to from both arithmetic units is multiplexed, and data for reference and data for update are switched via plural pointers. If a latest value is newly written in a free memory, the pointer indicating the data for reference is updated. When carrying out the pointer update or reference in this manner, a data conflict between the arithmetic units occurs and therefore exclusive control is used. When reference processing is executed, a pointer for reference is newly created to refer to the multiplexed data. Therefore, it is possible to access the shared data without thinking about the executing CPU.